package springcloudconfigclient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import springcloudconfigclient.service.TestService;

@Controller
public class HelloController {

	@Autowired
	private TestService testService;

	int a = 0;

	@RequestMapping("/hello")
	public String hello(Model model) {
		int c = testService.getCount();
		model.addAttribute("hello", c + a++);
		return "hello";
	}
}
